Decimal To Hexadecimal Conversion

dec

1 dec = 1 hex

Want to convert from hexadecimal to decimal instead?

Disclaimer: We've spent hundreds of hours building and testing our calculators and conversion tools. However, we cannot be held liable for any damages or losses (monetary or otherwise) arising out of or in connection with their use. Full disclaimer.

How to convert decimal to hexadecimal (dec to hex)

Converting from decimal (base-10) to hexadecimal (base-16) is a common task in computer science and digital systems. Hexadecimal notation is used extensively in computing because it provides a more concise and convenient way to represent large binary values. In hexadecimal, each digit can represent values from 0 to 15, making use of the digits 0-9 and the letters A to F. The mapping for decimal digits to hexadecimal is shown below.
Decimal (Base-10) Hexadecimal (Base-16)
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
Here's a step-by-step guide on how to convert decimal numbers to hexadecimal.1. Divide the Decimal Number: Start by dividing the decimal number by 16. Keep track of both the quotient and remainder. 2. Convert Remainders to Hexadecimal: Convert the remainders obtained from each division into their hexadecimal equivalents using the mapping provided earlier.3. Repeat the Division: Continue dividing the quotient from the previous step by 16 until the quotient becomes zero. At each step, convert the remainder to hexadecimal.4. Combine Hexadecimal Digits: Once you've obtained the hexadecimal representations for all remainders, read them in reverse order to obtain the final hexadecimal representation of the decimal number.5. Remove Leading Zeros: If the hexadecimal representation contains leading zeros, you can choose to remove them to make the representation more concise. Leading zeros do not affect the value of the hexadecimal number.

Example Conversion

Converting 255 from decimal to hex

The process to convert 25510 to hexadecimal is:
Divide by 16 Quotient Remainder Remainder in Hex Digit Position
255 ÷ 16 15 15 F 2
15 ÷ 16 0 15 F 1
Therefore the decimal 255 = FF in hexadecimal.

Converting 1480 from decimal to hex

The process to convert 148010 to hexadecimal is:
Divide by 16 Quotient Remainder Remainder in Hex Digit Position
1480 ÷ 16 92 8 8 3
92 ÷ 16 5 12 C 2
5 ÷ 16 0 5 5 1
Therefore the decimal 1480 = 5C8 in hexadecimal.

Converting hexadecimal to decimal

Converting from hexadecimal (base-16) to decimal (base-10) is a straightforward process that involves understanding the positional value of each digit in the hexadecimal number and then performing the necessary arithmetic to obtain its decimal equivalent. Here's a step-by-step guide on how to convert hexadecimal numbers to decimal.1. In hexadecimal, each digit can represent values from 0 to 15, using the digits 0-9 and the letters A to F. The mapping for hexadecimal digits to decimal is shown below.
Hexadecimal (Base-16) Decimal (Base-10)
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
A 10
B 11
C 12
D 13
E 14
F 15
2. Begin by writing down the hexadecimal number you want to convert to decimal.3. Assign positional values to each digit in the hexadecimal number, starting from the rightmost digit. The rightmost digit has a positional value of 16^0 (which equals 1), the next digit to the left has a positional value of 16^1 (which equals 16), and so on, increasing the exponent by 1 as you move to the left.4. Multiply each digit by its respective positional value and sum up the products. Remember to use the decimal equivalents for the hexadecimal digits.5. The sum from step 4 represents the decimal equivalent of the hexadecimal number.

Conversion Unit Definitions

What is a Decimal?

The decimal number system, often called base-10, is the numerical system most commonly used by humans for everyday counting and arithmetic. It utilizes ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The concept behind the decimal system is that each digit's value is determined by its position within the number, with each position representing a power of 10.
In the decimal system, the rightmost digit holds the smallest place value and represents 10^0, which is 1. The next digit to the left represents 10^1, which is 10, and the pattern continues as you move to the left. For example, in the number 456, the digit '6' is in the ones place (10^0), '5' is in the tens place (10^1), and '4' is in the hundreds place (10^2). To convert a decimal number to its numerical value, you sum up the product of each digit with its corresponding power of 10. In the case of 456, it's 410^2 + 510^1 + 6*10^0, which equals 400 + 50 + 6, resulting in the decimal value 456.
The decimal system is widely used in daily life because it's well-suited for human cognition, particularly for counting and representing quantities. It's also the standard system for representing fractional values, where digits to the right of the decimal point represent negative powers of 10 (e.g., 0.1, 0.01, 0.001). While the decimal system is prevalent in everyday arithmetic and commerce, the binary system (base-2) is favored in computing because electronic devices, such as computers and calculators, operate naturally with binary switches (0s and 1s). However, conversions between decimal and binary systems are essential for translating human-readable information into machine-readable formats, making these two number systems fundamental in the realm of mathematics and technology.

What is a Hexadecimal?

The hexadecimal number system, often referred to as base-16, is a fundamental numerical representation used extensively in computer science and digital technology. In the hexadecimal system, there are 16 possible digits: 0-9 and A-F, where A represents 10, B represents 11, C represents 12, D represents 13, E represents 14, and F represents 15. Each digit's value is determined by its position within the number, with each position representing a power of 16.
In the hexadecimal system, the rightmost digit holds the smallest place value and represents 16^0, which is 1. The next digit to the left represents 16^1, which is 16, and the pattern continues as you move to the left. For example, in the hexadecimal number 1A3, the digit '3' is in the ones place (16^0), 'A' is in the sixteens place (16^1), and '1' is in the 256s place (16^2). To convert a hexadecimal number to its decimal equivalent, you sum up the product of each digit with its corresponding power of 16. In the case of 1A3, it's 1*16^2 + A*16^1 + 3*16^0. When 'A' is converted to its decimal value (10), the calculation becomes 1*256 + 10*16 + 3*1, resulting in the decimal value 419.
Hexadecimal is widely used in computing for various purposes. It's particularly valuable in representing binary data more compactly and conveniently. Each hexadecimal digit corresponds to a group of four binary digits (bits), making it easier for programmers and engineers to work with binary data. Hexadecimal is also commonly used in memory addresses, color representations (such as in HTML color codes), and as a shorthand notation for binary patterns.
In summary, the hexadecimal number system plays a crucial role in digital technology, providing a concise and convenient way to represent and manipulate binary data and aiding in various aspects of computer programming and engineering.

Decimal To Hexadecimal Conversion Table

Below is a lookup table showing common decimal to hexadecimal conversion values.

DecimalHexadecimal
0 dec0 hex
1 dec1 hex
2 dec2 hex
3 dec3 hex
4 dec4 hex
5 dec5 hex
6 dec6 hex
7 dec7 hex
8 dec8 hex
9 dec9 hex
10 decA hex
11 decB hex
12 decC hex
13 decD hex
14 decE hex
15 decF hex
16 dec10 hex
17 dec11 hex
18 dec12 hex
19 dec13 hex
20 dec14 hex

Other Common Decimal Conversions

Below is a table of common conversions from decimal to other number system units.

ConversionResult
1 decimal in binary1 bin
1 decimal in octal1 oct

Decimal To Hexadecimal Conversion Chart